package cn.lefull.codegenerate;


import cn.lefull.codegenerate.CreatCode;

public class CreatCodeToThisProject {
    //数据库配置
    public final static String TABLE_SCHEMA = "lunch";

    //数据表配置 多张表用逗号隔开／
//    public final static String TABLE_NAME = "employee,user,user_address,app_info" +
//            ",dealer_pay_config,pay_product,pay_record,pay_way,user_app" +
//            ",wx_form_log,wx_msg,wx_msg_template,active_member,active_apartment,active_info,banner,banner_img,goods,active_goods,goods_img,notice,order_goods,order_info,order_log";
 public final static String TABLE_NAME = "apartment_revenue,apartment_subject";

    //项目名配置
    public final static String PROJECT_NAME = "springboot-lefull-data";

    public static void main(String[] args) {
        try {
            //创建mybatis
            String tb = TABLE_NAME;
            CreatCode creatCode = new CreatCode();
            //初始化项目路径
            creatCode.setProjectName(PROJECT_NAME);
            //获取数据库表字段信息
            creatCode.read(TABLE_SCHEMA, tb);
            //创建文件
            creatCode.creatTblFile(tb.toLowerCase());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
